-
Notifications
You must be signed in to change notification settings - Fork 8
[AGNTLOG-468] chore(datadog): add trace sampling #1110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Binary Size Analysis (Agent Data Plane)Target: be34af7 (baseline) vs b0ba6d8 (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
| saluki_components::transforms::trace_sampler | +35.11 KiB | 23 |
| core | +31.12 KiB | 66 |
| hashbrown | +9.00 KiB | 7 |
| saluki_core::data_model::event | +5.95 KiB | 7 |
| ZN76<saluki_core | -5.72 KiB | 2 |
| [sections] | +3.64 KiB | 7 |
| serde_core | +2.12 KiB | 8 |
| saluki_components::common::datadog | +1.87 KiB | 17 |
| saluki_components::common::otlp | +1.44 KiB | 2 |
| saluki_core::topology::blueprint | +1.27 KiB | 1 |
| saluki_config::GenericConfiguration::try_get_typed | +1.23 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.10093 | +1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.10090 | -1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.8479 | +1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.8784 | +1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.9054 | +1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.8476 | -1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.8781 | -1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.9051 | -1.10 KiB | 1 |
| _ZN4http6header4name14StandardHeader6as_str17hb45bedc01a2a74c0E.10812 | +1.10 KiB | 1 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
+3.6% +69.7Ki +4.1% +60.9Ki [630 Others]
[NEW] +27.3Ki [NEW] +27.2Ki saluki_components::transforms::apm_stats::ApmStats::process_trace::hea01e15f0321d337
[NEW] +20.4Ki [NEW] +20.3Ki saluki_components::encoders::datadog::traces::TraceEndpointEncoder::encode_tracer_payload::h8e94d45f42e4f777
[NEW] +14.8Ki [NEW] +14.6Ki _<saluki_components::transforms::trace_sampler::TraceSampler as saluki_core::components::transforms::Transform>::run::_{{closure}}::h85b5a4b8d8f03e25
[NEW] +13.9Ki [NEW] +13.7Ki _<core::marker::PhantomData<T> as serde_core::de::DeserializeSeed>::deserialize::h9e9260c51df6c275
[NEW] +11.5Ki [NEW] +11.3Ki saluki_components::common::datadog::apm::ApmConfig::from_configuration::had70a6878fa7d173
[NEW] +7.61Ki [NEW] +7.48Ki saluki_components::transforms::trace_sampler::score_sampler::ScoreSampler::sample::hfc28eb294ce41497
[NEW] +6.13Ki [NEW] +6.00Ki _ZN76_<hickory_proto::rr::record_data::RData as core::clone::Clone>5clone17h61f3fe4fffa4b03dE.8776
[NEW] +5.65Ki [NEW] +5.50Ki _<core::marker::PhantomData<T> as serde_core::de::DeserializeSeed>::deserialize::hf0643ecc9b96a441
[NEW] +5.52Ki [NEW] +5.39Ki _ZN76_<hickory_proto::rr::record_data::RData as core::clone::Clone>5clone17h61f3fe4fffa4b03dE.11905
[NEW] +5.35Ki [NEW] +5.23Ki _ZN59_<rustls::error::Error as core::clone::Clone>5clone17hd14a1219ce5dde1cE.10816
[NEW] +5.27Ki [NEW] +5.14Ki _<saluki_core::data_model::event::trace::Span as core::clone::Clone>::clone::h67b60e9c023e938d
[DEL] -5.21Ki [DEL] -5.09Ki _ZN59_<rustls::error::Error as core::clone::Clone>5clone17hd14a1219ce5dde1cE.11853
[DEL] -5.35Ki [DEL] -5.23Ki _ZN59_<rustls::error::Error as core::clone::Clone>5clone17hd14a1219ce5dde1cE.10807
[DEL] -5.52Ki [DEL] -5.39Ki _ZN76_<hickory_proto::rr::record_data::RData as core::clone::Clone>5clone17h61f3fe4fffa4b03dE.11890
[DEL] -6.13Ki [DEL] -6.00Ki _ZN76_<hickory_proto::rr::record_data::RData as core::clone::Clone>5clone17h61f3fe4fffa4b03dE.8773
[DEL] -10.5Ki [DEL] -10.3Ki _ZN76_<saluki_core::data_model::event::Event as core::clone::Clone>5clone17h7f500b934c4a671bE.10782
[DEL] -11.1Ki [DEL] -11.0Ki saluki_components::common::datadog::apm::ApmConfig::from_configuration::hde97307d5b1f378a
[DEL] -12.3Ki [DEL] -12.1Ki _<core::marker::PhantomData<T> as serde_core::de::DeserializeSeed>::deserialize::hf57b1009e3f2b7f6
[DEL] -20.1Ki [DEL] -20.0Ki saluki_components::encoders::datadog::traces::TraceEndpointEncoder::encode_tracer_payload::h253c709930a63a8e
[DEL] -27.3Ki [DEL] -27.2Ki saluki_components::transforms::apm_stats::ApmStats::process_trace::hf762265449fd0933
+0.3% +89.6Ki +0.3% +80.4Ki TOTAL
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: 920e3daf-a7ba-4092-b53b-43d9a4826bd2 Baseline: be34af7 ❌ Experiments with retried target crashesThis is a critical error. One or more replicates failed with a non-zero exit code. These replicates may have been retried. See Replicate Execution Details for more information.
Optimization Goals: ❌ Regression(s) detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ❌ | otlp_ingest_logs_5mb_memory | memory utilization | +9.24 | [+8.75, +9.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.01 | [-0.12, +0.14] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.42 | [-5.49, +4.65] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | +11.82 | [-45.77, +69.41] | 1 | (metrics) (profiles) (logs) |
| ❌ | otlp_ingest_logs_5mb_memory | memory utilization | +9.24 | [+8.75, +9.73] | 1 | (metrics) (profiles) (logs) |
| ❌ | otlp_ingest_traces_5mb_cpu | % cpu utilization | +8.24 | [+5.71, +10.78] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | +1.29 | [-4.67, +7.25] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | +0.96 | [-29.25, +31.17] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | +0.36 | [+0.16, +0.56] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +0.36 | [+0.17, +0.55] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.33 | [+0.15, +0.51] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | +0.23 | [+0.10, +0.37] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | +0.21 | [-1.07, +1.48] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | +0.19 | [+0.00, +0.38] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | +0.18 | [-0.01, +0.36] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | +0.17 | [-0.02, +0.37] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | +0.01 | [-0.04, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | +0.01 | [-0.12, +0.14] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | +0.01 | [-0.05, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | +0.00 | [-0.05, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | -0.00 | [-0.13, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | -0.01 | [-0.14, +0.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | -0.01 | [-0.06, +0.04] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | -0.07 | [-0.23, +0.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | -0.10 | [-0.14, -0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | -0.19 | [-0.31, -0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.42 | [-5.49, +4.65] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | -0.49 | [-0.62, -0.35] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | -0.70 | [-6.72, +5.31] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | -1.31 | [-2.01, -0.62] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | -3.50 | [-3.73, -3.28] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | -18.06 | [-65.78, +29.65] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | links |
|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | (metrics) (profiles) (logs) |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
Replicate Execution Details
We run multiple replicates for each experiment/variant. However, we allow replicates to be automatically retried if there are any failures, up to 8 times, at which point the replicate is marked dead and we are unable to run analysis for the entire experiment. We call each of these attempts at running replicates a replicate execution. This section lists all replicate executions that failed due to the target crashing or being oom killed.
Note: In the below tables we bucket failures by experiment, variant, and failure type. For each of these buckets we list out the replicate indexes that failed with an annotation signifying how many times said replicate failed with the given failure mode. In the below example the baseline variant of the experiment named experiment_with_failures had two replicates that failed by oom kills. Replicate 0, which failed 8 executions, and replicate 1 which failed 6 executions, all with the same failure mode.
| Experiment | Variant | Replicates | Failure | Logs | Debug Dashboard |
|---|---|---|---|---|---|
| experiment_with_failures | baseline | 0 (x8) 1 (x6) | Oom killed | Debug Dashboard |
The debug dashboard links will take you to a debugging dashboard specifically designed to investigate replicate execution failures.
❌ Retried Normal Replicate Execution Failures (non-profiling)
| Experiment | Variant | Replicates | Failure | Debug Dashboard |
|---|---|---|---|---|
| otlp_ingest_traces_5mb_throughput | comparison | 0 | Failed to shutdown when requested | Debug Dashboard |
| quality_gates_rss_dsd_low | baseline | 3 | Failed to shutdown when requested | Debug Dashboard |
| quality_gates_rss_dsd_ultraheavy | baseline | 3 | Failed to shutdown when requested | Debug Dashboard |
| } | ||
|
|
||
| #[async_trait] | ||
| impl Transform for TraceSampler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly saying this out loud so that I don't forget, but we'll likely want to end up making this a synchronous transform so that we can avoid the cost of message passing.
… metadata from the sampling transform component
942206a to
df45987
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
mergequeue build completed successfully, but the github api returned an error while merging the pr.
DetailsError: PUT https://api.github.com/repos/DataDog/saluki/pulls/1110/merge: 405 Repository rule violations found 1 review requesting changes and 1 approving review by reviewers with write access. 14 of 14 required status checks are expected. [] (Request ID: ED00:4E0E8:DC70FE:3D2421E:697A82FB) FullStacktrace: 1 review requesting changes and 1 approving review by reviewers with write access. 14 of 14 required status checks are expected. [] (Request ID: ED00:4E0E8:DC70FE:3D2421E:697A82FB) (type: GitFailure, retryable: false): PUT https://api.github.com/repos/DataDog/saluki/pulls/1110/merge: 405 Repository rule violations found 1 review requesting changes and 1 approving review by reviewers with write access. 14 of 14 required status checks are expected. [] (type: ErrorResponse, retryable: true) |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
mergequeue build completed successfully, but the github api returned an error while merging the pr.
DetailsError: PUT https://api.github.com/repos/DataDog/saluki/pulls/1110/merge: 405 Repository rule violations found 1 review requesting changes and 1 approving review by reviewers with write access. 14 of 14 required status checks are expected. [] (Request ID: ED00:4E0E8:EBF2D4:416EA64:697A860B) FullStacktrace: 1 review requesting changes and 1 approving review by reviewers with write access. 14 of 14 required status checks are expected. [] (Request ID: ED00:4E0E8:EBF2D4:416EA64:697A860B) (type: GitFailure, retryable: false): PUT https://api.github.com/repos/DataDog/saluki/pulls/1110/merge: 405 Repository rule violations found 1 review requesting changes and 1 approving review by reviewers with write access. 14 of 14 required status checks are expected. [] (type: ErrorResponse, retryable: true) |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
devflow unqueued this merge request: It did not become mergeable within the expected time |
Summary
This PR adds sampling (probalistic, error) for OTLP traces that match the agent's behavior.
In the agent, the priority sampler, and the error sampler is enabled by default
TargetTpsandErrorTpsare set to non zero valuesChange Type
How did you test this PR?
Correctness tests, manual testing.
build adp and run with sampling enabled.
Send traces, verify that around ~DD_APM_CONFIG__PROBABILISTIC_SAMPLER__SAMPLING_PERCENTAGE are missing from the trace explorer.
View the trace explorer (link). I use the env "wacktest4" to filter for my spans, and for some reason the live explorer is not working for me but idk.
References